{extend name="common:frm_base" /}
{block name="content"}
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header">{if $act eq 'add'}添加{else}编辑{/if}管理员</div>
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" action="{:url('Admin/handle')}" lay-filter="component-form-group">
                <div class="layui-form-item">
                    <label class="layui-form-label">管理员账户</label>
                    <div class="layui-input-inline">
                        <input type="text" value="{$info['name']|default=''}" name="name" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">管理员角色</label>
                    <div class="layui-input-inline">
                        <select name="role_id">
                            <option value="">请选择角色</option>
                            {volist name="role_list" id="val"}
                            <option {if $info['role_id']==$val['id']}selected{/if} value="{$val.id}">{$val['name']}</option>
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">站点类型</label>
                    <div class="layui-input-inline">
                        <select name="site_id">
                            <option value="">请选择站点类型</option>
                            {volist name="site" id="val"}
                            <option {if $info['site_id']==$val['id']}selected{/if} value="{$val.id}">{$val['name']}</option>
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">服务队列表</label>
                    <div class="layui-input-inline">
                        <select name="oid">
                            <option value="">请选择服务队</option>
                            {volist name="team" id="val"}
                            <option {if $info['oid']==$val['id']}selected{/if} value="{$val.id}">{$val['name']}</option>
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">管理员密码</label>
                    <div class="layui-input-inline">
                        <input type="password" value="" name="password" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">密码为空即表示不修改密码</div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">确认密码</label>
                    <div class="layui-input-inline">
                        <input type="password" value="" name="r_password" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux"></div>
                </div>
                <!--<div class="layui-form-item">-->
                    <!--<label class="layui-form-label">管理员</label>-->
                    <!--<div class="layui-input-block">-->
                        <!--<input type="checkbox" name="is_admin" {if $info.is_admin==1 }checked{/if} lay-skin="switch" value="1" lay-text="ON|OFF">-->
                    <!--</div>-->
                <!--</div>-->
                <div class="layui-form-item">
                    <label class="layui-form-label">状态</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="status" {if $info.status==1 }checked{/if} lay-skin="switch" value="1" lay-text="ON|OFF">
                    </div>
                </div>
                <input type="hidden" value="{$act}" name="act" />
                <input type="hidden" value="{$info['id']|default=''}" name="id" />
                <div class="layui-form-item layui-hide">
                    <input type="button" lay-submit lay-filter="LAY-user-front-submit" id="LAY-user-front-submit" value="确认">
                </div>
                <!--<div class="layui-form-item layui-layout-admin">-->
                <!--<div class="layui-input-block">-->
                <!--<div class="layui-footer" style="left: 0;">-->
                <!--<button class="layui-btn" lay-submit="" lay-filter="component-form-demo1">立即提交</button>-->
                <!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
                <!--</div>-->
                <!--</div>-->
                <!--</div>-->
            </form>
        </div>
    </div>
</div>


<script>
    layui.config({
        base: '__LAYUIADMIN__/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'laydate'], function(){
        var $ = layui.$
            ,admin = layui.admin
            ,element = layui.element
            ,layer = layui.layer
            ,laydate = layui.laydate
            ,form = layui.form;

        form.render(null, 'component-form-group');

        laydate.render({
            elem: '#LAY-component-form-group-date'
        });


    });
</script>
</body>
</html>
{/block}